package com.shaoshaohuo.app.net;

import android.content.Context;

import com.shaoshaohuo.app.entity.Address;
import com.shaoshaohuo.app.entity.BaseEntity;
import com.shaoshaohuo.app.entity.EditPurchasePublished;
import com.shaoshaohuo.app.entity.EditSupplyPublished;
import com.shaoshaohuo.app.entity.brandscope.BrandScope;
import com.shaoshaohuo.app.entity.cart.EcCartOrder;
import com.shaoshaohuo.app.entity.post.BusinessPublish;
import com.shaoshaohuo.app.entity.post.CarInfo;
import com.shaoshaohuo.app.entity.post.PurchasePublished;
import com.shaoshaohuo.app.entity.post.PurchaseQuote;
import com.shaoshaohuo.app.entity.post.SendGoodsEditEntity;
import com.shaoshaohuo.app.entity.post.SendGoodsEntity;
import com.shaoshaohuo.app.entity.post.SupplyOrderAdd;
import com.shaoshaohuo.app.entity.post.SupplyPublished;
import com.shaoshaohuo.app.net.HttpConfig.SubUrl;
import com.shaoshaohuo.app.net.HttpRequest.RequestListener;

import java.util.Map;

/**
 * 具体请求 Created by yusonglin on 2015/7/9. Description: http service
 */
public class RequestService {

	private volatile static RequestService mInstance;

	private RequestService() {
	}

	public static RequestService getInstance() {
		if (mInstance == null) {
			synchronized (RequestService.class) {
				if (mInstance == null) {
					mInstance = new RequestService();
				}
			}
		}
		return mInstance;
	}

	/**
	 * @param context
	 *            用户名
	 *            密码
	 * @param clazz
	 * @param callBack
	 */
	public void login(Context context, String mobile, String smscode, String investCode, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getLoginParams(mobile, smscode, investCode);
		new HttpRequest(context).post(RequestCode.LOGIN, map, SubUrl.LOGIN, clazz, callBack);
	}

	public void getCitys(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.CITY, map, SubUrl.CITY, clazz, callBack);
	}

	/**
	 * 发送支付密码验证短信
	 * 
	 * @param context
	 * @param clazz
	 * @param callBack
	 */
	public void sendPaySms(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.SEND_PAY_SMS, map, SubUrl.SEND_PAY_SMS, clazz, callBack);
	}

	/**
	 * 发送login验证短信
	 * 
	 * @param context
	 * @param clazz
	 * @param callBack
	 */
	public void sendLoginSms(Context context, String mobile, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getLoginSmsParams(mobile);
		new HttpRequest(context).post(RequestCode.SEND_LOGIN_SMS, map, SubUrl.SEND_LOGIN_SMS, clazz,
				callBack);
	}

	public void getCarType(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.GET_CAR_TYPE, map, SubUrl.GET_CAR_TYPE, clazz, callBack);
	}

	public void getUserInfo(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.GET_USER_INFO, map, SubUrl.GET_USER_INFO, clazz, callBack);
	}

	public void uploadImage(Context context, String filePath, String mediatype, String isSupply, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		// Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).uploadImage(mediatype, isSupply, RequestCode.UPLOAD_IMAGE, SubUrl.UPLOAD_IMAGE, filePath, clazz,
				callBack);
	}
	public void uploadImage(Context context, String filePath, String mediatype, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		// Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).uploadImage(mediatype, RequestCode.UPLOAD_IMAGE, SubUrl.UPLOAD_IMAGE, filePath, clazz,
				callBack);
	}

	public void addOftenAddress(Context context, String cityid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getAddAddressParams(cityid);
		new HttpRequest(context).post(RequestCode.SAVE_OFTEN_ADDRESS, map, SubUrl.SAVE_OFTEN_ADDRESS, clazz,
				callBack);
	}

	public void getAddedService(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.GET_ADDED_SERVICE, map, SubUrl.GET_ADDED_SERVICE, clazz,
				callBack);
	}

	public void saveMyBaseInfo(Context context, String avatar, String realname, String mIdnum, String gender,
			String birthday, String idphoto1, String idphoto2,String addressCityId, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSaveBaseInfoParams(avatar, realname, mIdnum, gender, birthday,
				idphoto1, idphoto2,addressCityId);
		new HttpRequest(context).post(RequestCode.SAVE_MY_INFO, map, SubUrl.SAVE_MY_INFO, clazz, callBack);
	}

	public void getUserInfo(Context context, String userid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getUserInfoParams(userid);
		new HttpRequest(context).post(RequestCode.GET_POINT_USER_INFO, map, SubUrl.GET_POINT_USER_INFO,
				clazz, callBack);
	}

	public void deleteReside(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDeleteResideParams(id);
		new HttpRequest(context).post(RequestCode.DELETE_RESIDE, map, SubUrl.DELETE_RESIDE, clazz, callBack);
	}

	public void saveLine(Context context, String fromcityid, String tocityid,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSaveLineParams(fromcityid, tocityid);
		new HttpRequest(context).post(RequestCode.SAVE_LINE, map, SubUrl.SAVE_LINE, clazz, callBack);
	}

	public void deleteLine(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDeleteResideParams(id);
		new HttpRequest(context).post(RequestCode.DELETE_LINE, map, SubUrl.DELETE_LINE, clazz, callBack);
	}

	public void saveCar(Context context, CarInfo info, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSaveCarParams(info);
		new HttpRequest(context).post(RequestCode.SAVE_CAR, map, SubUrl.SAVE_CAR, clazz, callBack);
	}

	public void updateCar(Context context, CarInfo info, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSaveCarParams(info);
		new HttpRequest(context).post(RequestCode.UPDATE_CAR, map, SubUrl.UPDATE_CAR, clazz, callBack);
	}

	public void sendGoods(Context context, SendGoodsEntity info, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSeedsGoodsParams(info);
		new HttpRequest(context).post(RequestCode.SEND_GOODS, map, SubUrl.SEND_GOODS, clazz, callBack);
	}

	public void getCargoOrderCarList(Context context, String size, String cursor, String action, String searchstatus,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getCargoOrderParams(size, cursor, action, searchstatus);
		new HttpRequest(context).post(RequestCode.CARGO_ORDER_LIST, map, SubUrl.CARGO_ORDER_LIST_CAR, clazz,
				callBack);
	}

	public void getCargoOrderShipperList(Context context, String size, String cursor, String action,
			String searchstatus, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getCargoOrderParams(size, cursor, action, searchstatus);
		new HttpRequest(context).post(RequestCode.CARGO_ORDER_LIST, map, SubUrl.CARGO_ORDER_LIST_SHIPPER,
				clazz, callBack);
	}

	public void getFocusImage(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.GET_FOCUS_IMAGE, map, SubUrl.GET_FOCUS_IMAGE, clazz,
				callBack);
	}

	public void getOrderDetail(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCargoOrderDetailParams(orderid);
		new HttpRequest(context).post(RequestCode.GET_ORDER_DETAIL, map, SubUrl.GET_ORDER_DETAIL, clazz,
				callBack);
	}

	public void getMessageList(Context context, String size, String cursor, String action, String type,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getMessageListParams(size, cursor, action, type);
		new HttpRequest(context).post(RequestCode.GET_ORDER_DETAIL, map, SubUrl.GET_MESSAGE_LIST, clazz,
				callBack);
	}

	/**
	 * 订单提醒
	 * 
	 * @param context
	 * @param orderid
	 * @param tipstype
	 * @param clazz
	 * @param callBack
	 */
	public void remindOrder(Context context, String orderid, String tipstype, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getRemindParams(orderid, tipstype);
		new HttpRequest(context).post(RequestCode.REMIND_ORDER, map, SubUrl.REMIND_ORDER, clazz, callBack);
	}

	// public void remindOrderShipper(Context context, String orderid, String
	// tipstype, Class<?
	// extends BaseEntity> clazz,
	// HttpRequest.RequestListener callBack) {
	// Map<String, String> map = RequestParam.getRemindParams(orderid,
	// tipstype);
	// new HttpRequest(context).post(RequestCode.SHIPPER_ORDER_HANDLER, map,
	// HttpConfig.SubUrl.SHIPPER_ORDER_HANDLER, clazz, callBack);
	// }
	public void orderProcess(Context context, String orderid, String handleStatus, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getProcessParams(orderid, handleStatus);
		new HttpRequest(context).post(RequestCode.ORDER_PROCESS_SURE, map, SubUrl.ORDER_PROCESS_SURE, clazz,
				callBack);
	}

	public void orderProcessShipper(Context context, String orderid, String handleStatus,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getProcessParams(orderid, handleStatus);
		new HttpRequest(context).post(RequestCode.SHIPPER_ORDER_HANDLER, map, SubUrl.SHIPPER_ORDER_HANDLER,
				clazz, callBack);
	}

	public void getQiangList(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCargoOrderDetailParams(orderid);
		new HttpRequest(context).post(RequestCode.ORDER_QIANG_LIST, map, SubUrl.ORDER_QIANG_LIST, clazz,
				callBack);
	}

	public void selectGrabDriver(Context context, String orderid, String caruserid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSelectDriverParams(orderid, caruserid);
		new HttpRequest(context).post(RequestCode.SELECT_GRAB_DRIVER, map, SubUrl.SELECT_GRAB_DRIVER, clazz,
				callBack);
	}

	public void getAccountDetail(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.ACCOUNT_DETAIL, map, SubUrl.ACCOUNT_DETAIL, clazz,
				callBack);
	}
	public void searchCar(Context context, String action, String size, String cursor, String lng, String lat,
			String cartype, String carcid, String longoption, String weightoption,
			String origincityid, String receivecityid, String triptype ,Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSearchCarParams(action, size, cursor, lng, lat, cartype, carcid,
				longoption, weightoption, origincityid, receivecityid, triptype);
		new HttpRequest(context).post(RequestCode.SEARCH_CAR, map, SubUrl.SEARCH_CAR, clazz, callBack);
	}

	public void driverOperate(Context context, String orderid, String typeid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getOperateParams(orderid, typeid);
		new HttpRequest(context).post(RequestCode.SEARCH_CAR, map, SubUrl.DRIVER_OPERATE, clazz, callBack);
	}

	public void evaluation(Context context, String orderid, String content, String startnum,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEvaluationParams(orderid, content, startnum);
		new HttpRequest(context).post(RequestCode.DISCUSS_SEND, map, SubUrl.DISCUSS_SEND, clazz, callBack);
	}

	public void evaluationEc(Context context, String orderid, String content, String typeid, String startnum,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEvaluationEcParams(orderid, content, typeid, startnum);
		new HttpRequest(context).post(RequestCode.EC_DISCUSS_SEND, map, SubUrl.EC_DISCUSS_SEND, clazz,
				callBack);
	}

	public void getEvaluationList(Context context, String userid,String orderid,String dtype, String size, String cursor, String action,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEvaluationListParams(userid,orderid,dtype ,size, cursor, action);
		new HttpRequest(context).post(RequestCode.GET_EVALUATION_LIST, map, SubUrl.GET_EVALUATION_LIST,
				clazz, callBack);
	}

	public void searchCargo(Context context, String action, String size, String cursor, String lng, String lat,
			String shipptype, String ranktype, String origincityid,
			String receivecityid, boolean isMap, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSearchCargoParams(action, size, cursor, lng, lat, shipptype, ranktype,
				origincityid, receivecityid, isMap);
		new HttpRequest(context).post(RequestCode.SEARCH_CARGO, map, SubUrl.SEARCH_CARGO, clazz, callBack);
	}

	/**
	 * 车主抢单
	 */
	public void grabOrder(Context context, String orderid, String money, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getGrabOrderParams(orderid, money);
		new HttpRequest(context).post(RequestCode.DRIVER_QIANG, map, SubUrl.DRIVER_QIANG, clazz, callBack);
	}

	public void reportGeo(Context context, String lng, String lat, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getReportGeoParams(lng, lat);
		new HttpRequest(context).post(RequestCode.REPORT_GEO, map, SubUrl.REPORT_GEO, clazz, callBack);
	}

	public void mainIndex(Context context, String newssize, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getMainIndex(newssize);
		new HttpRequest(context).post(RequestCode.MAIN_INDEX, map, SubUrl.MAIN_INDEX, clazz, callBack);
	}

	public void getCouponList(Context context, String size, String action, String cursor, String status,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getCouponParams(size, action, cursor, status);
		new HttpRequest(context).post(RequestCode.GET_COUPON_LIST, map, SubUrl.GET_COUPON_LIST, clazz,
				callBack);
	}

	public void getPayFlow(Context context, String cursor, String offset, String typeid,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPayFlowParams(cursor, offset, typeid);
		new HttpRequest(context).post(RequestCode.PAY_FLOW, map, SubUrl.PAY_FLOW, clazz, callBack);
	}

	public void getPointList(Context context, String size, String action, String cursor,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPointListParams(size, action, cursor);
		new HttpRequest(context).post(RequestCode.POINT_LIST, map, SubUrl.POINT_LIST, clazz, callBack);
	}

	public void getPointMallList(Context context, String size, String action, String cursor,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPointListParams(size, action, cursor);
		new HttpRequest(context).post(RequestCode.POINT_MALL_LIST, map, SubUrl.POINT_MALL_LIST, clazz,
				callBack);
	}

	public void getPointGoodsDetail(Context context, String goodsid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getPointGoodsDetailParams(goodsid);
		new HttpRequest(context).post(RequestCode.POINT_GOODS_DETAIL, map, SubUrl.POINT_GOODS_DETAIL, clazz,
				callBack);
	}

	public void exchangeGoods(Context context, String goodsid, String num, String contact, String phone, String address,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getExchangeGoodsParams(goodsid, num, contact, phone, address);
		new HttpRequest(context).post(RequestCode.EXCHANGE_GOODS, map, SubUrl.EXCHANGE_GOODS, clazz,
				callBack);
	}

	public void exchangeGoodsNotes(Context context, String size, String action, String cursor,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPointListParams(size, action, cursor);
		new HttpRequest(context).post(RequestCode.EXCHANGE_GOODS_RECORD, map, SubUrl.EXCHANGE_GOODS_RECORD,
				clazz, callBack);
	}

	public void withdraw(Context context, String id, String account, String realname, String idnum, String money,String code,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getWithdrawParams(id, account, realname, idnum, money, code);
		new HttpRequest(context).post(RequestCode.WITHDRAW, map, SubUrl.WITHDRAW, clazz, callBack);
	}

	public void supportWithdraw(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.SUPPORT_WITHDRAW, map, SubUrl.SUPPORT_WITHDRAW, clazz,
				callBack);
	}

	public void rechange(Context context, String money, String paykey, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getRechangeParams(money, paykey);
		new HttpRequest(context).post(RequestCode.RECHANGE, map, SubUrl.RECHANGE, clazz, callBack);
	}

	public void resetPwd(Context context, String passwd, String newpasswd, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getResetPwdParams(passwd, newpasswd);
		new HttpRequest(context).post(RequestCode.RESET_PWD, map, SubUrl.RESET_PWD, clazz, callBack);
	}

	public void forgotPwd(Context context, String code, String passwd, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getForgotPwdParams(code, passwd);
		new HttpRequest(context).post(RequestCode.FORGOT_PWD, map, SubUrl.FORGOT_PWD, clazz, callBack);
	}

	public void feedback(Context context, String content, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getFeedbackParams(content);
		new HttpRequest(context).post(RequestCode.FORGOT_PWD, map, SubUrl.FEED_BACK, clazz, callBack);
	}

	public void payOrderByBalance(Context context, String orderid, String paykey, String passwd, String money,
			String couponid, String origincontact, String originphone, String bxprice, String bxnum,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPayParams(orderid, paykey, passwd, money, couponid, origincontact,
				originphone, bxprice, bxnum);
		new HttpRequest(context).post(RequestCode.PAY_CONFIM, map, SubUrl.PAY_CONFIM, clazz, callBack);
	}

	public void sendPwdSms(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.SEND_PAY_SMS, map, SubUrl.SEND_PAY_SMS, clazz, callBack);
	}

	public void getNewsList(Context context, String cursor, String size, String action, String catid,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getNewsListParams(cursor, size, action, catid);
		new HttpRequest(context).post(RequestCode.NEWS_LIST, map, SubUrl.NEWS_LIST, clazz, callBack);
	}

	public void getTools(Context context, String newssize, String citycode, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getToolsParams(newssize, citycode);
		new HttpRequest(context).post(RequestCode.APP_TOOLS, map, SubUrl.APP_TOOLS, clazz, callBack);
	}


	public void sendGoodsByCar(Context context, SendGoodsEntity info, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSeedsGoodsByCarParams(info);
		new HttpRequest(context).post(RequestCode.SEND_GOODS_BY_CAR, map, SubUrl.SEND_GOODS_BY_CAR, clazz,
				callBack);
	}

	// --------------EC-----------------
	public void getEcCategory(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.EC_CATEGORY, map, SubUrl.EC_CATEGORY, clazz, callBack);
	}

	public void getEcCategoryVariety(Context context, String bigpid, String pid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCategoryVariety(bigpid, pid);
		new HttpRequest(context).post(RequestCode.EC_CATEGORY_VARIETY, map, SubUrl.EC_CATEGORY_VARIETY,
				clazz, callBack);
	}

	public void getEcMainIndex(Context context, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.EC_MAIN_INDEX, map, SubUrl.EC_MAIN_INDEX, clazz, callBack);
	}

	public void ecMarketSearch(Context context, String cityid, String name,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEcMarketSearchParams(cityid, name);
		new HttpRequest(context).post(RequestCode.EC_MARKET_SEARCH, map, SubUrl.EC_MARKET_SEARCH, clazz,
				callBack);
	}

	public void setRole(Context context, String roleid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSetRoleParams(roleid);
		new HttpRequest(context).post(RequestCode.USER_SET_ROLE, map, SubUrl.USER_SET_ROLE, clazz, callBack);
	}

	@Deprecated
	public void purchasePublished(Context context, PurchasePublished purchasePublished,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPurchasePublishedParams(purchasePublished);
		new HttpRequest(context).post(RequestCode.PURCHASE_PUBLISHED, map, SubUrl.PURCHASE_PUBLISHED, clazz,
				callBack);
	}

	public void purchasePublishedMyList(Context context, String cursor, String size, String action,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPurchasePublishedListParams(cursor, size, action);
		new HttpRequest(context).post(RequestCode.PURCHASE_PUBLISHED_MYLIST, map,
				SubUrl.PURCHASE_PUBLISHED_MYLIST, clazz, callBack);
	}

	public void supplyPublish(Context context, SupplyPublished supplyPublished, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyPublishParams(supplyPublished);
		new HttpRequest(context).post(RequestCode.SUPPLY_PUBLISH, map, SubUrl.SUPPLY_PUBLISH, clazz,
				callBack);
	}

	public void supplyPublishMyList(Context context, String cursor, String offset, String action,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyPublishListParams(cursor, offset, action);
		new HttpRequest(context).post(RequestCode.SUPPLY_PUBLISH_MYLIST, map, SubUrl.SUPPLY_PUBLISH_MYLIST,
				clazz, callBack);
	}

	public void supplyPublishList(Context context, String cursor, String offset, String action, String bigpid,
			String pid, String catid, String cityid, String shuai, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyPublishListParams(cursor, offset, action, bigpid, pid, catid, cityid, shuai);
		new HttpRequest(context).post(RequestCode.SUPPLY_PUBLISH_LIST, map, SubUrl.SUPPLY_PUBLISH_LIST,
				clazz, callBack);
	}

	public void supplyPublishList(Context context, String cursor, String offset, String action, String bigpid,
			String pid, String catid, String cityid, String shuai, String brandScope, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyPublishListParams(cursor, offset, action, bigpid, pid, catid, cityid, shuai, brandScope);
		new HttpRequest(context).post(RequestCode.SUPPLY_PUBLISH_LIST, map, SubUrl.SUPPLY_PUBLISH_LIST,
				clazz, callBack);
	}

	public void getSupplyDetail(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyDetailParams(id);
		new HttpRequest(context).post(RequestCode.SUPPLY_DETAIL, map, SubUrl.SUPPLY_DETAIL, clazz, callBack);
	}

	public void getSupplyOrderDetail(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getOrderDetailParams(id);
		new HttpRequest(context).post(RequestCode.SUPPLY_ORDER_DETAIL, map, SubUrl.SUPPLY_ORDER_DETAIL,
				clazz, callBack);
	}

	public void getPurchaseDetail(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyDetailParams(id);
		new HttpRequest(context).post(RequestCode.PURCHASE_DETAIL, map, SubUrl.PURCHASE_DETAIL, clazz,
				callBack);
	}

	public void getPurchaseOrderDetail(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getOrderDetailParams(id);
		new HttpRequest(context).post(RequestCode.PURCHASE_ORDER_DETAIL, map, SubUrl.PURCHASE_ORDER_DETAIL,
				clazz, callBack);
	}

	public void addSupplyOrder(Context context, SupplyOrderAdd supplyOrder, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSupplyOrderAddParams(supplyOrder);
		new HttpRequest(context).post(RequestCode.SUPPLY_ORDER_ADD, map, SubUrl.SUPPLY_ORDER_ADD, clazz,
				callBack);
	}

	public void ecOrderPay(Context context, String action, String orderid, String paykey, String passwd, String money,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEcPayOrderParams(action, orderid, paykey, passwd, money);
		new HttpRequest(context).post(RequestCode.EC_ORDER_PAY, map, SubUrl.EC_ORDER_PAY, clazz, callBack);
	}

	public void getSupplyOrderList(Context context, String action, String cursor, String offset, String status,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEcSupplyOrderParams(action, cursor, offset, status);
		new HttpRequest(context).post(RequestCode.EC_SUPPLY_ORDER_LIST, map, SubUrl.EC_SUPPLY_ORDER_LIST,
				clazz, callBack);
	}

	public void getPurchaseOrderList(Context context, String status, String cursor, String size, String action,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEcPurchaseOrderParams(status, cursor, size, action);
		new HttpRequest(context).post(RequestCode.EC_PURCHASE_ORDER_LIST, map, SubUrl.EC_PURCHASE_ORDER_LIST,
				clazz, callBack);
	}

	public void getPurchaseQuoteList(Context context, String orderid, String cursor, String size, String action,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getQuoteListParams(orderid, cursor, size, action);
		new HttpRequest(context).post(RequestCode.EC_PURCHASE_QUOTE_LIST, map, SubUrl.EC_PURCHASE_QUOTE_LIST,
				clazz, callBack);
	}

	public void purchaseQuote(Context context, PurchaseQuote purchaseQuote, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getQuoteParams(purchaseQuote);
		new HttpRequest(context).post(RequestCode.EC_PURCHASE_QUOTE, map, SubUrl.EC_PURCHASE_QUOTE, clazz,
				callBack);
	}

	public void getQuoDetail(Context context, String id, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getQuoteDetailParams(id, orderid);
		new HttpRequest(context).post(RequestCode.EC_PURCHASE_QUOTE_DETAIL, map,
				SubUrl.EC_PURCHASE_QUOTE_DETAIL, clazz, callBack);
	}

	public void cancelSupplyOrder(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.SUPPLY_ORDER_CANCEL, map, SubUrl.SUPPLY_ORDER_CANCEL,
				clazz, callBack);
	}

	public void getPurchaseList(Context context, String cursor, String size, String action, String bigpid, String catid,
			String varieties, String cityid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getPurchaseListParams(cursor, size, action, bigpid, catid, varieties, cityid);
		new HttpRequest(context).post(RequestCode.PURCHASE_ORDER_LIST, map, SubUrl.PURCHASE_ORDER_LIST,
				clazz, callBack);
	}

	public void findSellerList(Context context, String cursor, String offset, String action, String bigpid, String pid,
			String catid, String cityid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getFindSellerListParams(cursor, offset, action, bigpid, pid, catid, cityid);
		new HttpRequest(context).post(RequestCode.FIND_SELLER, map, SubUrl.FIND_SELLER, clazz, callBack);
	}

	public void findBuyersList(Context context, String size, String cursor, String action, String cityid, String lng, String lat, String long1, String buyersize, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getBuyersListParams(size, cursor, action, cityid, lng, lat,
				long1, buyersize);
		new HttpRequest(context).post(RequestCode.FIND_BUYERS, map, SubUrl.FIND_BUYERS, clazz, callBack);
	}

	public void businessPublish(Context context, BusinessPublish businessPublish, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getBusinessPushlishedParams(businessPublish);
		new HttpRequest(context).post(RequestCode.BUSINESS_PUBLISH, map, SubUrl.BUSINESS_PUBLISH, clazz,
				callBack);
	}

	public void findBuyersMore(Context context, String marketid, String buyersize, String cursor,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.findBuyersMore(marketid, buyersize, cursor);
		new HttpRequest(context).post(RequestCode.FIND_BUYERS_MORE, map, SubUrl.FIND_BUYERS_MORE, clazz,
				callBack);
	}

	public void saveBigCustomerInfo(Context context, String avatar, String realname, String mobile, String license,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.saveBigCustomerInfo(avatar, realname, mobile, license);
		new HttpRequest(context).post(RequestCode.USER_INFO_BIGCUSTOMER_SAVE, map,
				SubUrl.USER_INFO_BIGCUSTOMER_SAVE, clazz, callBack);
	}

	public void saveWareHouseInfo(Context context, String avatar, String realname, String mobile, String nickname,
			String idphoto1, String idphoto2, String menlogo, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.saveWarehouseInfo(avatar, realname, mobile, nickname, idphoto1, idphoto2,
				menlogo);
		new HttpRequest(context).post(RequestCode.USER_INFO_WAREHOUSE_SAVE, map,
				SubUrl.USER_INFO_WAREHOUSE_SAVE, clazz, callBack);
	}

	public void getMyBusinessList(Context context, String bigpid, String pid, String catid,
			String cityid, String cursor, String action, String offset, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getBusinessHistoryParams(bigpid, pid, catid, cityid, cursor,
				action, offset);
		new HttpRequest(context).post(RequestCode.BUSINESS_HISTORY, map, SubUrl.BUSINESS_HISTORY, clazz,
				callBack);
	}

	public void getMarketDetail(Context context, String marketid, String buyersize, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getMarketDetailParams(marketid, buyersize);
		new HttpRequest(context).post(RequestCode.MARKET_DETAIL, map, SubUrl.MARKET_DETAIL, clazz, callBack);
	}

	public void getSellerDetail(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSellerDetailParams(id);
		new HttpRequest(context).post(RequestCode.SELLER_DETAIL, map, SubUrl.SELLER_DETAIL, clazz, callBack);
	}

	public void selectQuote(Context context, String id, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getQuoteDetailParams(id, orderid);
		new HttpRequest(context).post(RequestCode.PURCHASE_SELECTSUPPLY, map, SubUrl.PURCHASE_SELECTSUPPLY,
				clazz, callBack);
	}

	public void searchEc(Context context, String keyword, String size, String cursor, String action, String typeid,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSearchParams(keyword, size, cursor, action, typeid);
		new HttpRequest(context).post(RequestCode.SEARCH_LIST, map, SubUrl.SEARCH_LIST, clazz, callBack);
	}

	public void deleteBusiness(Context context, String id, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getSellerDetailParams(id);
		new HttpRequest(context).post(RequestCode.DELETE_BUSINESS, map, SubUrl.DELETE_BUSINESS, clazz,
				callBack);
	}

	public void cancelPurchaseOrder(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.PURCHASE_ORDER_CANCEL, map, SubUrl.PURCHASE_ORDER_CANCEL,
				clazz, callBack);
	}

	public void receivePurchaseOrder(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.PURCHASE_ORDER_RECEIVER_GOODS, map,
				SubUrl.PURCHASE_ORDER_RECEIVER_GOODS, clazz, callBack);
	}

	public void getMyQuoteDetail(Context context, String supplyuserid, String orderid,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getMyQuoteDetailParams(supplyuserid, orderid);
		new HttpRequest(context).post(RequestCode.SUPPLY_QUOTE_MY_DETAIL, map, SubUrl.SUPPLY_QUOTE_MY_DETAIL,
				clazz, callBack);
	}

	public void deletePurchaseOrder(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.DELETE_PURCHASE_ORDER, map, SubUrl.DELETE_PURCHASE_ORDER,
				clazz, callBack);
	}

	public void deleteSupplyOrder(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.DELETE_SUPPLY_ORDER, map, SubUrl.DELETE_SUPPLY_ORDER,
				clazz, callBack);
	}

	public void supplyOrderSendGoods(Context context, String orderid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelSupplyOrderParams(orderid);
		new HttpRequest(context).post(RequestCode.SEND_SUPPLY_ORDER, map, SubUrl.SEND_SUPPLY_ORDER, clazz,
				callBack);
	}

	public void supplyOrderRemind(Context context, String orderid, String typeid, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getRemindSupplyOrderParams(orderid, typeid);
		new HttpRequest(context).post(RequestCode.SUPPLY_ORDER_REMIND, map, SubUrl.SUPPLY_ORDER_REMIND,
				clazz, callBack);
	}

	public void checkPayPwd(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.CHECK_PAY_PWD, map, SubUrl.CHECK_PAY_PWD, clazz, callBack);
	}

	/** 浏览记录 */
	public void browseRecord(Context context, String count, Class<? extends BaseEntity> clazz,
			RequestListener callBack) {
		Map<String, String> map = RequestParam.getBrowseRecordParams(count);
		new HttpRequest(context).post(RequestCode.BROWSE_RECORD, map, SubUrl.BROWSE_RECORD, clazz, callBack);
	}

	/** 市场行情 */
	public void marketPrice(Context context, String type, String action, String cursor, String offset,
			String addressCode,String levelType,String bigName, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getMarketPriceParams(type, action, cursor, offset, addressCode, levelType, bigName);
		new HttpRequest(context).post(RequestCode.MARKET_PRICE, map, SubUrl.MARKET_PRICE, clazz, callBack);
	}
	/** 增加收获地址 */
	public void addAddress(Context context, Address address, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getAddAddressParams(address);
		new HttpRequest(context).post(RequestCode.ADD_ADDRESS, map, SubUrl.ADD_ADDRESS, clazz, callBack);
	}
	/** 删除收获地址 */
	public void deleteAddress(Context context, String ids, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDeleteAddressParams(ids);
		new HttpRequest(context).post(RequestCode.DELETE_ADDRESS, map, SubUrl.DELETE_ADDRESS, clazz, callBack);
	}
	/** 设置默认  收获地址 */
	public void setDefaultAddress(Context context, String id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSetDefaultAddressParams(id);
		new HttpRequest(context).post(RequestCode.DEFAULT_ADDRESS, map, SubUrl.DEFAULT_ADDRESS, clazz, callBack);
	}
	/** 获取常用    收货地址 */
	public void getOftenAddress(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.OFTEN_ADDRESS, map, SubUrl.OFTEN_ADDRESS, clazz, callBack);
	}
	/** 获取默认  收货地址 */
	public void getDefaultAddress(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.GET_DEFAULT_ADDRESS, map, SubUrl.GET_DEFAULT_ADDRESS, clazz, callBack);
	}
	/** 支付详情 */
	public void getIncomeStatement(Context context,String cursor, String typeid,String offset,String month,Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getIncomeStatement(cursor, typeid, offset, month);
		new HttpRequest(context).post(RequestCode.INCOME_STATEMENT, map, SubUrl.INCOME_STATEMENT, clazz, callBack);
	}
	/** 用户签到*/
	public void userSign(Context context,Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getUserSign();
		new HttpRequest(context).post(RequestCode.USER_SIGN, map, SubUrl.USER_SIGN, clazz, callBack);
	}
    
	//------------电商购物车--------------
	/**电商购物车  商品放入购物车*/
	public void addGoodsToEcCart(Context context, String goods_id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getAddGoodsToEcCartParams(goods_id);
		new HttpRequest(context).post(RequestCode.EC_CART_ADD, map, SubUrl.EC_CART_ADD, clazz, callBack);
	}
	/**电商购物车列表*/
	public void ecCartList(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getHeaderParams();
		new HttpRequest(context).post(RequestCode.EC_CART_LIST, map, SubUrl.EC_CART_LIST, clazz, callBack);
	}
	/**从电商购物车删除商品*/
	public void deleteFromEcCart(Context context, String goodsId, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDeleteFromEcCartParams(goodsId);
		new HttpRequest(context).post(RequestCode.EC_CART_DELETE, map, SubUrl.EC_CART_DELETE, clazz, callBack);
	}
	/**电商下单，同时支持直接下单与购物车下单*/
	public void saveEcCartOrder(Context context, EcCartOrder cartOrder, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSaveEcCartOrderParams(cartOrder);
		new HttpRequest(context).post(RequestCode.EC_CART_ORDER, map, SubUrl.EC_CART_ORDER, clazz, callBack);
	}
	
	/**显示用户签到 积分*/
	public void userSignPoint(Context context,Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getDefaultParams();
		new HttpRequest(context).post(RequestCode.USER_SIGN_POINT, map, SubUrl.USER_SIGN_POINT, clazz, callBack);
	}
	
	/**我要买 新接口  支持发布多个商品*/
	public void purchasePublishedMore(Context context, PurchasePublished purchasePublished,
			Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getPurchasePublishedMoreParams(purchasePublished);
		new HttpRequest(context).post(RequestCode.PUBLISHED_MORE, map, SubUrl.PURCHASE_PUBLISHED_MORE, clazz,
				callBack);
	}
	
	/**
	 * 用于统计记录真实用户量（区别注册量）的接口
	 * @param context
	 * @param clazz
	 * @param callBack
	 */
	public void appStart(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getHeaderParams();
		new HttpRequest(context).post(RequestCode.APP_START, map, SubUrl.APP_START, clazz, callBack);
	}
	
	/**
	 * 分享送积分
	 * @param context
	 * @param clazz
	 * @param callBack
	 */
	public void shareGetScore(Context context, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getHeaderParams();
		new HttpRequest(context).post(RequestCode.SHARE_GET_SCORE, map, SubUrl.SHARE_GET_SCORE, clazz, callBack);
	}
	/**
	 * 检查版本更新
	 */
	public void checkVersion(Context context,String versionName, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getCheckVersionParams(versionName);
		new HttpRequest(context).post(RequestCode.CHECK_VERSION, map, SubUrl.CHECK_VERSION, clazz, callBack);
	}

    /**
     * 银行卡列表
     */
    public void payAccountList(Context context, boolean isDefault,Class<? extends BaseEntity> clazz, RequestListener callBack) {
        Map<String, String> map = RequestParam.getPayAccountListParams(isDefault ? "1" : "0");
        new HttpRequest(context).post(RequestCode.PAY_ACCOUNT_LIST, map, SubUrl.PAY_ACCOUNT_LIST, clazz, callBack);
    }
    /**添加银行卡*/
    public void addPayAccount(Context context, String id, String account, String realname, String mobile, String subbranch, Class<? extends BaseEntity> clazz, RequestListener callBack) {
        Map<String, String> map = RequestParam.getAddPayAccountParams(id, account, realname, mobile, subbranch);
        new HttpRequest(context).post(RequestCode.ADD_PAY_ACCOUNT, map, SubUrl.ADD_PAY_ACCOUNT, clazz, callBack);
    }
    /**删除银行卡*/
    public void deletePayAccount(Context context, String id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
        Map<String, String> map = RequestParam.getDeletePayAccountParams(id);
        new HttpRequest(context).post(RequestCode.DELETE_PAY_ACCOUNT, map, SubUrl.DELETE_PAY_ACCOUNT, clazz, callBack);
    }
    /**设置默认银行卡*/
    public void setDefaultAccount(Context context, String id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
        Map<String, String> map = RequestParam.getSetDefaultAccountParams(id);
        new HttpRequest(context).post(RequestCode.SET_DEFAULT_ACCOUNT, map, SubUrl.SET_DEFAULT_ACCOUNT, clazz, callBack);
    }
    /**通过绑定的银行卡提现*/
    public void applyForAccount(Context context, String id,String money,String code, Class<? extends BaseEntity> clazz, RequestListener callBack) {
        Map<String, String> map = RequestParam.getApplyForAccountParams(id, money, code);
        new HttpRequest(context).post(RequestCode.APPLY_FOR_ACCOUNT, map, SubUrl.APPLY_FOR_ACCOUNT, clazz, callBack);
    }


	/**
	 * 获取用户已发布货源列表
	 */
	public void publishedGoodsList(Context context, String cursor, String offset, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedGoodsList(cursor, offset);
		new HttpRequest(context).post(RequestCode.PUBLISHED_GOODS_LIST, map, SubUrl.PUBLISHED_GOODS_LIST, clazz, callBack);
	}

	/**
	 * 刷新用户已发布的货源
	 */
	public void publishedGoodsListRefresh(Context context, String id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedGoodsListRefresh(id);
		new HttpRequest(context).post(RequestCode.PUBLISHED_GOODS_ITEM_FRESH, map, SubUrl.PUBLISHED_GOODS_ITEM_FRESH, clazz, callBack);
	}

	/**
	 * 修改用户已发布的货源
	 */
	public void publishedGoodsListEdit(Context context, SendGoodsEditEntity entity, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEditSeedsGoodsParams(entity);
		new HttpRequest(context).post(RequestCode.PUBLISHED_GOODS_ITEM_EDIT, map, SubUrl.PUBLISHED_GOODS_ITEM_EDIT, clazz, callBack);
	}

	/**
	 * 删除用户已发布的货源
	 */
	public void publishedGoodsListDelete(Context context, String id, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedGoodsListDelete(id);
		new HttpRequest(context).post(RequestCode.PUBLISHED_GOODS_ITEM_DELETE, map, SubUrl.PUBLISHED_GOODS_ITEM_DELETE, clazz, callBack);
	}

	/**
	 * 刷新用户已发布的采购
	 */
	public void publishedPurchaseRecordRefresh(Context context, String number, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedPurchaseRecordRefresh(number);
		new HttpRequest(context).post(RequestCode.PUBLISHED_PURCHASE_RECORED_REFRESH, map, SubUrl.PUBLISHED_PURCHASE_RECORED_REFRESH, clazz, callBack);
	}

	/**
	 * 修改用户已发布的采购
	 */
	public void publishedPurchaseRecordEdit(Context context, EditPurchasePublished entity, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEditPurchaseRecordParams(entity);
		new HttpRequest(context).post(RequestCode.PUBLISHED_PURCHASE_RECORED_EDIT, map, SubUrl.PUBLISHED_PURCHASE_RECORED_EDIT, clazz, callBack);
	}

	/**
	 * 删除用户已发布的采购
	 */
	public void publishedPurchaseRecordDelete(Context context, String number, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedPurchaseRecordDelete(number);
		new HttpRequest(context).post(RequestCode.PUBLISHED_PURCHASE_RECORED_DELETE, map, SubUrl.PUBLISHED_PURCHASE_RECORED_DELETE, clazz, callBack);
	}

	/**
	 * 刷新用户已发布的供应
	 */
	public void publishedSupplyRecordRefresh(Context context, String number, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedSupplyRecordRefresh(number);
		new HttpRequest(context).post(RequestCode.PUBLISHED_SUPPLY_RECORED_REFRESH, map, SubUrl.PUBLISHED_SUPPLY_RECORED_REFRESH, clazz, callBack);
	}

	/**
	 * 修改用户已发布的供应
	 */
	public void publishedSupplyRecordEdit(Context context, EditSupplyPublished entity, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getEditSupplyRecordParams(entity);
		new HttpRequest(context).post(RequestCode.PUBLISHED_SUPPLY_RECORED_EDIT, map, SubUrl.PUBLISHED_SUPPLY_RECORED_EDIT, clazz, callBack);
	}

	/**
	 * 删除用户已发布的供应
	 */
	public void publishedSupplyRecordDelete(Context context, String number, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.publishedSupplyRecordDelete(number);
		new HttpRequest(context).post(RequestCode.PUBLISHED_SUPPLY_RECORED_DELETE, map, SubUrl.PUBLISHED_SUPPLY_RECORED_DELETE, clazz, callBack);
	}

	/**
	 * 我的报价
	 */
	public void myPrice(Context context,int type,String cursor,String offset, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getMyPriceParams(type, cursor, offset);
		new HttpRequest(context).post(RequestCode.MY_PRICE, map, SubUrl.MY_PRICE, clazz, callBack);
	}

	/**
	 * 货主找到车后，给车下单
	 */
	public void shipperChooseCar(Context context, String caruserid, String goodsId, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.shipperChooseCar(caruserid, goodsId);
		new HttpRequest(context).post(RequestCode.SHIPPER_CHOOSE_CAR, map, SubUrl.SHIPPER_CHOOSE_CAR, clazz, callBack);
	}

	/**
	 * 修改我的报价
	 */
	public void modifyPrice(Context context, String id, String money, String type, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getModifyPriceParams(id, money, type);
		new HttpRequest(context).post(RequestCode.MODIFY_PRICE, map, SubUrl.MODIFY_PRICE, clazz, callBack);
	}

	/**
	 * 取消我的报价
	 */
	public void cancelPrice(Context context, String id,String type, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getCancelPriceParams(id, type);
		new HttpRequest(context).post(RequestCode.CANCEL_PRICE, map, SubUrl.CANCEL_PRICE, clazz, callBack);
	}

     /**
	 * 取消我的报价
	 */
	public void getSpecifications(Context context, String bigpid,String pid,String catid, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getSpecificationParams(bigpid, pid, catid);
		new HttpRequest(context).post(RequestCode.GET_SPECIFICATION, map, SubUrl.GET_SPECIFICATION, clazz, callBack);
	}

     /**
	 * 实名认证
	 */
	public void auditRealName(Context context, String realname, String idnum, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getAuditRealnameParams(realname, idnum);
		new HttpRequest(context).post(RequestCode.AUDIT_REAL_NAME, map, SubUrl.AUDIT_REAL_NAME, clazz, callBack);
	}


	/**
	 * 品牌直营，准入资料提交
	 */
	public void brandScopeApply(Context context, BrandScope brandScope, Class<? extends BaseEntity> clazz, RequestListener callBack) {
		Map<String, String> map = RequestParam.getBrandScopeApplyParams(brandScope);
		new HttpRequest(context).post(RequestCode.BRAND_SCOPE_APPLY, map, SubUrl.BRAND_SCOPE_APPLY, clazz, callBack);
	}
}
